﻿using System;

class BitValue
{
    static void Main(string[] args)
    {
        Console.WriteLine("Vuvedete chislo:");
        int TestNumber = int.Parse(Console.ReadLine());
        Console.WriteLine("Vuvedete poziciq na bit:");
        int BitPosition = int.Parse(Console.ReadLine());
        int mask = 1 << BitPosition;
        Console.WriteLine((TestNumber&mask) !=0 ? "1": "0");

    }
}

